home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c,era.misc.software
- Path: ERA.COM!era!pumphrey
- From: pumphrey@ERA.COM (Mark Pumphrey)
- Subject: Turbo C to 80386 Assy Calling Problem
- Message-ID: <PUMPHREY.96Mar1172435@icarus.ERA.COM>
- Followup-To: comp.lang.c
- Sender: news@ERA.COM
- Organization: Engineering Research Associates, Vienna, VA
- Date: Fri, 1 Mar 1996 22:24:35 GMT
-
- I am having a hard time building seperate objects from
- assembler and c sources that can reference each other.
-
- 1. If I build using an object library, does not work...
-
- tasm get_cpx.asm, get_cpx.obj
- Turbo Assembler Version 1.01
-
- tlib libcc.lib -+ get_cpx.obj
- tlib 3.02
-
- tcc -v -lc -etest.exe test.c libcc.lib
- Turbo C++ version 1.01
-
- Error: Undefined symbol _get_cpx in module test.c
-
- 2. If I build all at once, does work...
-
- tcc -v -etest.exe test.c get_cpx.asm
-
- 3. Source code...
-
- #define DECLARATIONS
-
- #include <stdio.h> /* used for debugging */
- #include "common.h"
- extern int get_cpx();
- main()
- {
- int i;
-
- i=get_cpx();
- printf("i=%d\n",i);
- }
-
- .model small
- .code
- public _get_cpx
- _get_cpx proc
- mov ax,23
- ret
- _get_cpx endp
- end
-
-
- If anyone knows how to crack this puzzle, sure would
- help. I tried contacting Borland but just got ignored.
-
- **************************************************************************
- * Name: Mark Pumphrey Room: 560 *
- * Company: E-Systems Falls Church Div. Phone: 703/734-8800 *
- * Address: 1595 Spring Hill Road Extension: 8329 *
- * Vienna, Virginia 22182 Fax: 703/734-8862 *
- * Email: pumphrey@era.com (A Raytheon Company) *
- **************************************************************************
-
-